import { network } from '@/utils';
import { SortingInfoParams } from './data';

import { basic } from '../../../../../config/Apis';

export async function querylogisticsCenterSorting(params: { logisId: number }) {
  return network.get(basic.region_sortingList, {
    params,
  });
}

export async function querylogisticsCenterRegion(params: { logisId: number }) {
  return network.get(basic.region_baseList, { params });
}

export async function operSaveOrUpdate(params: SortingInfoParams) {
  return params.type
    ? network.post(basic.region_sorting, { data: params })
    : network.put(basic.region_sorting, { data: params });
}
